package com.ruoyi.lagou.mybatis.service.impl;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.lagou.mybatis.mapper.SysUserAnnotationMapper;
import com.ruoyi.lagou.mybatis.service.ISysUserAnnotationService;
import com.ruoyi.lagou.mybatisplus.domain.SysUserMybatis;
import com.ruoyi.lagou.mybatisplus.mapper.SysUserMybatisMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 实现类
 * @author li_hai
 */
@Service
@RequiredArgsConstructor
public class SysUserAnnotationServiceImpl implements ISysUserAnnotationService {

    private final SysUserAnnotationMapper sysUserAnnotationMapper;
    private final SysUserMybatisMapper sysUserMybatisMapper;

    @Override
    public SysUser selectUserById(Long userId) {
        return sysUserAnnotationMapper.selectUserById(userId);
    }

    @Override
    public SysUser selectUserAndDeptById(Long userId) {
        return sysUserAnnotationMapper.selectUserAndDeptById(userId);
    }

    @Override
    public List<SysUserMybatis> findAll() {
        return sysUserMybatisMapper.selectList(null);
    }
}
